#include "student.h"

Time::Time(int hours=0, int minutes=0, int seconds=0) : 
            hour_(hours), minute_(minutes), second_(seconds){}
Time::~Time(){}

 void Time::SetHour(int hour)
{
    hour_ = hour;
}

 void Time::SetMinute(int minute)
{
    minute_ = minute;
}

 void Time::SetSecond(int second)
{
    second_ = second;
}

 void Time::ShowTime() const
{
    std:: cout << hour_ << ":" << minute_ << ":" << second_ << std::endl;
}

 int Time::GetHour() const
{
    return hour_;
}

 int Time::GetMinute() const
{
    return minute_;
}

 int Time::GetSecond() const
{
    return second_;
}

Date::Date(int year=1, int month=1, int day=1, int hour=0, int minute=0, int second=0):
        Time(hour, minute, second), year_(year), month_(month), day_(day){}
    
Date::~Date(){}

 void Date::SetYear(int year)
{
    year_ = year;
}

 void Date::SetMonth(int month)
{
    month_ = month;
}

 void Date::SetDay(int day)
{
    day_ = day;
}

 int Date::GetYear() const
{
    return year_;
}

 int Date::GetMonth() const
{
    return month_;
}

 int Date::GetDay() const
{
    return day_;
}

void Date::Show() const
{
    std::cout << year_ << '-' << month_ << '-' << day_
                << ":" << GetHour() << ":" << GetMinute() << ":" << GetSecond() << std::endl;
}

Student::Student(std::string name="None", int age=25):name_(name), age_(age){}

Student::~Student(){}

 void Student::SetName(std::string name)
{
    name_ = name;
}

 void Student::SetAge(int age)
{
    age_ = age;
}

void Student::SetDate(Date time)
{
    time_ = time;
}

 std::string Student::ShowName() const
{
    std::cout << "Name : " << name_ << std::endl;
    return name_;
}

 int Student::ShowAge() const
{
    std::cout << "Age : " << age_ << std::endl;
    return age_;
}

 Date Student::ShowTime() const
{
    time_.Show();
    return time_;
}

void Student::Show() const
{
    ShowName();
    ShowAge();
    ShowTime();
}
